﻿#ifndef FTPSERVER_H_  
#define FTPSERVER_H_

#include <ctime>
#include <iostream>
#include <string>
#include <boost/asio.hpp>
#include "Logger.hpp"
#include "Config.hpp"
#include "ClientSession.hpp"

using boost::asio::ip::tcp;

class FtpServer{
	 typedef boost::shared_ptr<ClientSession> session_ptr;
   public:
   	 FtpServer(boost::asio::io_service& ioservice,tcp::endpoint& endpoint);
   	 ~FtpServer();
   	 void start();
   	
   private:
   	 void log(std::string& message);
   	 void handle_accept(const boost::system::error_code& error,session_ptr& session);
   	 boost::asio::io_service& io_service;
   	 tcp::acceptor _acceptor;
};

#endif   